1. Field of the Invention
The present invention relates to write operations performed by a client computing station in a client/server computing system while the server or network is inoperative. More particularly, the present invention relates to management of log files maintained in the client by reducing the number of entries placed in the log file during a period of server or network unavailability.
2. Description of Related Art
In a client/server computing system operating over a network, file system architectures are employed in which the server stores all files created at the client in the computing system. In such a computing system, when an application program, operating on the client, needs to write data to a file, the file data is transferred over the network to the server for storage in the file maintained by the server. If the client is equipped with a local disk cache, the data is also optionally written to the local disk cache of the client. Under normal operating conditions, such a computing system can operate smoothly.
However, when the server becomes inoperative (i.e., crashes) or if the network connection between the server and the client becomes inoperative, then the client is unable to transfer new file data over the network to the server for storage therein as would normally be done. This period of server unavailability is also referred to as disconnected operations.
In order to make the client/server computing system more fault-tolerant, it is desirable to enable the user of an application program running on the client to be able to modify or write data to a file even during unavailability of the server.
During the period of server unavailability, a log file can be created and maintained in the client for collecting a list of operations performed by the client during the period of unavailability of the server. The log file generally includes the type of operation performed and the data associated with the operation, along with an identification of the file upon which the operation was performed. Once the server again becomes available, the client utilizes the log file to "replay" or "roll" the operations performed during the unavailability of the server, thereby attempting to insure the consistency between the server's version of the file and the client's version of the file.
Client operations involving file modifications (i.e., writing data to a file) during the unavailability of the server are of particular importance. Conventional log file techniques generally utilize a linear logging technique wherein all write file operations are sequentially entered into a single log file.
The linear logging technique has the disadvantage that the size of the log file can become quite large during extended periods of server unavailability, since each write operation performed to a file is separately entered in the log file. For instance, if a user running an application on the client modifies the same file 1,000 times during a period of server unavailability, the conventional linear logging technique would create 1,000 separate entries in the log file. A large log file is disadvantageous because during periods of server unavailability, the client's memory/storage space can become an extremely scarce resource, since the server is generally designed to have substantially greater file storage abilities than the client. If the growing size of the log file exceeds the client's memory/storage capabilities, then it is possible that the client could no longer process and store new data being provided by the user to the application program running on the client. Hence, operations on the client would have to be suspended under this scenario until the server again becomes available.
Furthermore, each entry placed into the log file requires processing time by the client. Where the client utilizes a disk cache for persistent storage, each write of data to the log file is associated with a period of disk processing time. Therefore, it is advantageous to minimize the number of entries placed in the log file to improve the performance of the client.
It is also important that the relative ordering of the file modifications listed in the log file is preserved. For example, if during disconnected operations, a file A was modified by the user at the client after a file B was modified, it is important that this relative order of file modifications is preserved. In some client/server computing systems, the server will maintain a modification time for each file, and update this modification time whenever the server modifies the file by writing data to the file. This modification time is utilized by many conventional software programs, such as the "makefile" compilation utility, to track the state of a file.
Therefore, the client should, during the "rolling" or replaying of the log file after the server has again become available, transfer the modified file data to the server in an order which accurately reflects the relative order in which the files were modified by the user on the client during disconnected operations.